<?php
$this->headLink(array('rel' => 'alternate','type' => 'application/atom+xml',
					  'title' => 'Liste aller Cocktailrezepte - Atom',
                      'href' => $this->url(array('module'=>'website','controller'=>'recipe')).'?format=atom'));
$this->headLink(array('rel' => 'alternate','type' => 'application/rss+xml',
					  'title' => 'Liste aller Cocktailrezepte - RSS',
                      'href' => $this->url(array('module'=>'website','controller'=>'recipe')).'?format=rss'));
$this->headLink(array('rel' => 'alternate','type' => 'application/json',
					  'title' => 'Liste aller Cocktailrezepte - JSON',
                      'href' => $this->url(array('module'=>'website','controller'=>'recipe')).'?format=json'));
$this->headLink(array('rel' => 'alternate','type' => 'application/xml',
					  'title' => 'Liste aller Cocktailrezepte - XML',
                      'href' => $this->url(array('module'=>'website','controller'=>'recipe')).'?format=xml'));
$this->headLink(array('rel' => 'alternate','type' => 'application/pdf',
					  'title' => 'Cocktailkarte mit allen Rezepten - PDF',
                      'href' => $this->url(array('module'=>'website','controller'=>'recipe')).'?format=pdf'));

if ($this->recipes) { ?>
<h2 style="margin-bottom: 1.5em; margin-top: 0; margin-left: 2em; margin-right: 2em;"><?php 
	if(!$this->title) { ?>Cocktailrezepte<?php } 
	else { echo $this->title; } ?></h2>
<div id="ergebnisse" style="clear: left;"><?php
foreach ($this->recipes as $recipe){
	if($this->top10){
		echo $this->cocktailPreview ($recipe,++$i);
	} else {
		echo $this->cocktailPreview ($recipe);
	}
}
?></div>
<!-- div: ergebnisse -->
<?php } else { ?>
<h2>Schade!</h2>
<p class="abstand_unten">Wir haben leider keine <?php if($this->title){ print $this->title.' '; ?>
gefunden.</p>
<p class="abstand_unten_doppelt">Bitte geben Sie einen anderen Suchbegriff ein.<?php  } else { ?>Bitte
geben Sie einen Suchbegriff ein.<?php } ?></p>
<?php } ?>
<?php 
$urlParams = Zend_Controller_Front::getInstance()->getParams();
$urlParams['index'] = 'index';
unset($urlParams['bootstrap']);
// set format to null,
// because it is added in alternative representation url as GET param
$urlParams['format'] = null;
unset($urlParams['search_type_value']);
unset($urlParams['disableOutputBuffering']);
if ($this->recipes) {
?>
<p class="clear">Alternative Darstellung der Ergebnisse als:</p>
<ul class="no-bullet" style="margin-top: 0.7em; margin-left: auto; margin-right: auto; <?php if(!Wb_Controller_Plugin_Layout::requestFromTouchDevice()){ ?>width: 25.5em;<?php } else { ?>width: 16.5em;<?php } ?>">
	<?php if(!Wb_Controller_Plugin_Layout::requestFromTouchDevice()){ ?>
	<li class="left" style="clear: none;"><a 
		href="<?php echo $this->url($urlParams); ?>?format=atom"><img src="<?php 
		echo $this->baseUrl();?>/img/icons/atom_2.png" alt="Atom" style="padding-top: 0.4em;" /></a></li>
	<li class="left" style="clear: none;"><a 
		href="<?php echo $this->url($urlParams); ?>?format=rss"><img 
		src="<?php echo $this->baseUrl();?>/img/icons/rss_2.png" alt="RSS" 
		style="margin-left: 1em; padding-top: 0.4em;" /></a></li>
	<li class="left" style="clear: none;"><a 
		href="<?php echo $this->url($urlParams);?>?format=xml"><img 
		src="<?php echo $this->baseUrl(); ?>/img/icons/xml.png" alt="XML" 
		style="margin-left: 1.2em; margin-right: 0.4em; margin-bottom: 0.3em; padding-top: 0.4em;" /></a></li>
	<li class="left" style="clear: none;"><a 
		href="<?php echo $this->url($urlParams); ?>?format=json"><img 
		src="<?php echo $this->baseUrl(); ?>/img/icons/json.png" alt="JSON" 
		style="margin-left: 0.9em; margin-bottom: 0.3em; padding-top: 0.4em;" /></a></li>
	<?php } ?>
	<li class="left" style="clear: none;"><a 
		href="<?php echo $this->url($urlParams);?>?format=htmlexport"><img 
		src="<?php echo $this->baseUrl(); ?>/img/icons/html.png" alt="HTML Export" 
		style="margin-left: 1.2em; margin-right: 0em; margin-bottom: 0.3em; padding-top: 0.4em;" /></a></li>
	<li class="left" style="clear: none;"><a 
		href="<?php echo $this->url($urlParams);?>?format=mobile"><img 
		src="<?php echo $this->baseUrl(); ?>/img/icons/mobile.png" alt="Mobile" 
		style="margin-left: 1.2em; margin-right: 0.1em; margin-bottom: 0.3em; padding-top: 0.35em;" /></a></li>
	<li class="left" style="clear: none;"><a 
		href="<?php echo $this->url($urlParams); ?>?format=pdf"><img 
		src="<?php echo $this->baseUrl(); ?>/img/icons/printer_2.png" alt="PDF Druck" 
		style="margin-left: 1.2em; margin-bottom: 0.3em; vertical-align: top; float: left; padding-top: 0.4em;" /><span 
		style="line-height: 1.5em; float: left; margin-left: 0.4em;font-size:0.825em" class="textLeft">als PDF<br/>Cocktailkarte</span></a></li>
</ul>
<?php }